﻿using Hotel_Project.Bean;
using Hotel_Project.Tools.MySqlData_Helps;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Hotel_Project.BIZ
{
    public class Night_ShenStrip
    {
        public void Add(List<Night_ShenDomain>list)
        {
            string sql = $"insert into staff values({list[0].Staff_id},{list[0].Staff_identity},'{list[0].Staff_name}',{list[0].Staff_age},'{list[0].Staff_sex}',{list[0].Staff_phone},'{list[0].Staff_birth}','{list[0].Time_on}','{list[0].End_time}')";            
            ExecuteMySql.MySql(MySqlString.MYSQL_CONNAND, sql);
        }
        public void Detele(List<Night_ShenDomain> list)
        {
            string sql = $"delete FROM staff where staff_id={list[0].Staff_id}";
            ExecuteMySql.MySql(MySqlString.MYSQL_CONNAND, sql);
        }
    }
}
